package com.example.rightmost.dao;

import com.example.rightmost.entity.Piece;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface PieceMapper {

    List<Piece> getPieceList(String text, String userName, String topicName);

    List<Piece> getPieces();

    int doWells(Integer pieceId, Integer num);

    int addPiece(Piece piece);

    List<Piece> getPiecesById(Integer id);

    void updateLikes(Integer id);

    //获取个人作品集
    List<Piece> getMyPiecesList(Piece piece);

    Piece getPieceById(int pieceId);

}
